import { FC } from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import TihaiMenu from "./component/menu/TihaiMenu";
import TihaiPreview from "./component/preview/TihaiPreview";
import SubmitChoice from "./component/submit/choice/SubmitChoice";
import SubmitBlank from "./component/submit/blank/SubmitBlank";
import SubmitMark from "./component/submit/mark/SubmiMark";
import TihaiUser from "./component/user/TihaiUser";
import SubmitSolution from "./component/submit/solution/SubmitSolution";
import { ConfigProvider } from "antd";
import zh_CN from 'antd/locale/zh_CN';

const App: FC = () => {
  return (
    <>
      <ConfigProvider locale={zh_CN}>
        <BrowserRouter>
          <TihaiMenu />
          <Routes>
            <Route path="/" element={<TihaiPreview />} />
            <Route path="/tihai" element={<TihaiPreview />} />

            <Route path="/submitChoice" element={<SubmitChoice />} />
            <Route path="/submitBlank" element={<SubmitBlank />} />
            <Route path="/submitMark" element={<SubmitMark />} />
            <Route path="/submitSolution" element={<SubmitSolution />} />

            <Route path="/user" element={<TihaiUser />} />
          </Routes>
        </BrowserRouter>
      </ConfigProvider>
    </>
  );
};

export default App;
